import request from '@/utils/request2'

export default {

  pageUser: function(data) {
    return request({
      url: '/system-permission/user/list',
      method: 'get',
      params: data
    })
  },

  saveUser: function(data) {
    return request({
      url: '/system-permission/user/save',
      method: 'post',
      params: data
    })
  },

  deleteUser: function(id) {
    return request({
      url: '/system-permission/user/' + id + '/delete',
      method: 'get'
    })
  },

  findDepartmentTree: function() {
    return request({
      url: '/system-permission/department/tree',
      method: 'get'
    })
  },

  findRoleList: function(data) {
    return request({
      url: '/system-permission/role/list',
      method: 'get',
      params: data
    })
  },
  findRoleListAll: function(data) {
    return request({
      url: '/system-permission/role/listAll',
      method: 'get',
      params: data
    })
  },

  findPositionList: function(data) {
    return request({
      url: '/system-permission/position/list',
      method: 'get',
      params: data
    })
  },
  findPositionTree: function() {
    return request({
      url: '/system-permission/position/tree',
      method: 'get'
    })
  }

}
